# name : proc seqdesign survival (Power and Sample size)
# key : seqdesign.survival.obf
# contributor: Shuguang Sun
# --
ods graphics on;
ods output boundary=${98:mod_}_ldl;
ods output powersamplesize=${99:mod}_pss;
proc seqdesign errspend pss stopprob
  boundaryscale = ${1:$$(yas-choose-value '("pvalue" "mle" "stdz" "score"))}
  plots = boundary (hscale = samplesize);
  TwoSidedOBrienFleming: design method = ${2:$$(yas-choose-value '("ERRFUNCOBF" "ERRFUNCPOC" "OBF" "POC" "ERRSPEND (numbers)" "HP(pvalue=0.0001)"))}
    alt = upper stop = reject
    nstages = 2 info = cum(${3:0.67}, 1)
    alpha = 0.025 beta = 0.10;
  samplesize
    model = twosamplesurv (
      nullmedsurvtime = ${4:1}
      medsurvtime = ${5:2}
      hazardratio = ${9:0.6}
      accrate = ${6:20} accrual = uniform foltime = ${7:2}
      loss = exp(hazard = ${8:0.01})
    );
run;
ods graphics off;
